<%@ page language="java" pageEncoding="utf-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@page import="com.fick.util.General"%>
<jsp:useBean id="pager" class="com.fick.util.Pager"></jsp:useBean>
<%
//String path = request.getContextPath();
//String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>  
    
	<link rel="stylesheet" href="../images/css.css" type="text/css">
<script type="text/javascript" src="../js/util.js"></script>
<% 
  	int currPage = (Integer)request.getAttribute("currPage");
  	int totalcount = (Integer)request.getAttribute("totalcount");
  	int totalPage = (Integer)request.getAttribute("totalPage"); 
  	String mediaclassId = General.convertNullToEmpty((String)request.getAttribute("mediaclassId")); 	
  %>
<script type="text/javascript">
	function selectMediaclassChange(id){
		location = "/nrgl/media.jhs?method=list&mediaclassid="+id;
	}
</script>
</head>

 <body bgcolor="#E7F2FE" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
  <tr>
    <td height="100%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td  background="images/main_top.gif" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="20" height="23">&nbsp;</td>
            <td class="f14">视频管理</td>
          </tr>
        </table></td>       
      </tr>
    </table>
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="40"><table width="94%" height="24" border="0" align="center" cellpadding="0" cellspacing="0" class="css_b2">
            <tr>            	
              <td align="right" valign="middle"><input type="button" value="添加" onclick="document.location.href='mediaedit.jsp'" ><br>
				</td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="72%" align="center" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="menu_border">
              <tr>
                <td valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="menu">
                    <tr>
                      <td class="menu_ico"></td>
                      <td class="menu_name">视频详细信息</td>
                    </tr>
              </table></tr>
              <tr>
                <td height="25" bgcolor="#E7F2FE"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#ACCDEC" class="table_margin">
                  <tr>   
                    <td width="150" height="30" align="center" bgcolor="#E7F2FE" class="css3">名称</td>
                     <td width="60" height="30" align="center" bgcolor="#E7F2FE" class="css3">是否有效</td>
                    <td width="70" height="30" align="center" bgcolor="#E7F2FE" class="css3">显示顺序</td>
                     <td width="70" height="30" align="center" bgcolor="#E7F2FE" class="css3">播放时间</td>
                     <td width="80" height="30" align="center" bgcolor="#E7F2FE" class="css3">添加时间</td>
                    <td width="120" height="30" align="center" bgcolor="#E7F2FE" class="css3">操作</td>
                  </tr>
                 <logic:present name="results">
          		 <logic:iterate id="result" name="results">
          		 <Tr>
          		 	
          		 	<td width="150" height="30" align="center" bgcolor="#E7F2FE" class="css1">
          		 		<bean:write property="mediaName" name="result"/>
          		 	</td>
          		 	<td width="60" height="30" align="center" bgcolor="#E7F2FE" class="css1">
          		 	${result.mediaStatus=="1"?"有效":"<span style='color:#FF0000'>无效</span>" }
          		 	</td>
          		 	<td width="70" height="30" align="center" bgcolor="#E7F2FE" class="css1"><bean:write property="mediaOrder" name="result"/></td>
          		 	<td width="80" height="30" align="center" bgcolor="#E7F2FE" class="css1"><bean:write property="mediaPlaytime" name="result"/></td>
          		    <td width="80" height="30" align="center" bgcolor="#E7F2FE" class="css1"><bean:write property="addtime" name="result" format="yyyy-MM-dd"/></td>
          		    <td width="120" height="30" align="center" bgcolor="#E7F2FE" class="css1">
          		     <a href='/admin/mediaAction.do?method=getMdfInfo&id=<bean:write property="mediaId" name="result"/>'>修改</a>
                    <a onClick="return confirm('您确认删除此条数据！请注意删除后无法恢复');" href='/admin/mediaAction.do?method=delete&currPage=<%=currPage %>&id=<bean:write property="mediaId" name="result"/>'>删除</a></td>
                 </Tr>
          		 </logic:iterate>
          		 </logic:present>
          		<tr>
          		 <%
			         out.println(pager.nprintTable("/admin/mediaAction.do?method=list&",currPage,totalPage,totalcount,"",""));                   
	             %>
          		</tr>
                  
                </table>
                </td>
              </tr>
          </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
  <%
	String msg = (String)request.getAttribute("msg");
 %>
  <script type="text/javascript">
  	var msg = "<%=msg%>";
  	if(msg!="null")
  		alert(msg);
  </script>
</html>
